#include <iostream>
//#include "../server/webserver.h"
#include "Process_poll.h"
#include <stdlib.h>
int main(int argc,char *argv[])
{
    if(argc!=2)
    {
        std::cout<<"Using ==> ./Server [Port]"<<std::endl;
        return -1;
    }
    #ifdef THREAD_POLL
        WebServer web(atoi(argv[1]),3,60000,false,12,false,1,1024);
        web.Start();        
    #endif

    #ifdef PROCESS_POLL
        /*[port] [child_proc_max] [timeout] [Optlinger][Openlog] [loglevel] [logcapacity]*/
        std::shared_ptr<process_poll> web = process_poll::create(atoi(argv[1]),
                                                                8,
                                                                60000,
                                                                3,
                                                                false,
                                                                false,
                                                                1,
                                                                1024);
        assert(web);
        web->run();
    #endif
    return 0;
}